import java.math.BigInteger;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int n;
        Scanner scanner=new Scanner(System.in);
        BigInteger[] sum=new BigInteger[10005];
        sum[0]=BigInteger.valueOf(1);
        sum[1]=BigInteger.valueOf(1);
        for(int i=2;i<=10000;i++){
            sum[i]=sum[i-1].multiply(BigInteger.valueOf(i));
        }
        while (scanner.hasNext()){
            n=scanner.nextInt();
            System.out.println(sum[n]);
        }
    }
}